#ifndef FIRMATA_HPP
#define FIRMATA_HPP

#define PROTOCOL_VERSION 0xF9
#define FIRMWARE_NAME_VS 0x79
#define START_SYSEX      0xF0
#define END_SYSEX        0xF7
#define SYSTEM_RESET     0xFF
#define SET_PIN_MODE     0xF4
#define ANALOG_MESSAGE   0xE0
#define DIGITAL_MESSAGE  0x90
#define SERVO_CONFIG     0x70
#define REPORT_ANALOG    0xC0
#define REPORT_DIGITAL   0xD0
#define STRING_MESSAGE   0x71

/*******
 * I2C *
 *******/

#define I2C_WRITE                0x00 // B00000000
#define I2C_READ                 0x08 // B00001000
#define I2C_READ_CONTINUOUSLY    0x10 // B00010000
#define I2C_STOP_READING         0x18 // B00011000
#define I2C_READ_WRITE_MODE_MASK 0x18 // B00011000

/**********
 * ANALOG *
 **********/

#define ANALOG_READ              0x08 // B00001000
#define ANALOG_READ_CONTINUOUSLY 0x10 // B00010000
#define ANALOG_STOP_READING      0x18 // B00011000
#define ANALOG_RW_MODE_MASK      0x18 // B00011000

#endif // FIRMATA_HPP
